home *** CD-ROM | disk | FTP | other *** search
/ Clickx 75 / Clickx 75.iso / software / expressionweb / expressionwebv3 / ExpressionWeb_en.exe / Setup / WeConen.cab / xweb.ACTIONS.INSERTOP.HTM.en < prev    next >
Encoding:
Text File  |  2009-06-09  |  4.6 KB  |  200 lines

  1. 
  2. <html>
  3.     <head>
  4.         <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  5.         <title>Dialog</title>
  6.         <meta name="DialogResizable" content="true">
  7.         <meta name="DialogSize" content="400,100">
  8.         
  9.         <style> 
  10.             button    { width: 8em; }                
  11.             table    { border: none; border-collapse: collapse }
  12.         </style>
  13.         <script src="FPLib.js" type="text/JavaScript"></script>
  14.         <script type="text/JavaScript">
  15.             var L_strInsert_DialogTitle        = "Add Choice";
  16.             var L_strEdit_DialogTitle        = "Edit Choice";        
  17.             var L_strMissingData_ErrorMessage    = "The choice field is required.";
  18.         </script>
  19.         <script type="text/JScript" src="Strings.js"></script>
  20.     </head>
  21.     <body onload="initializeForm()">
  22.         <form name="theForm" onsubmit="onOk(); return false;">
  23.             <table height="100%" width="100%">
  24.                 <tr>
  25.                     <td>
  26.                         <table>
  27.                             <tr>
  28.                                 <td nowrap>
  29.                                     <label for="Choice">
  30.                                         
  31.                                         Ch<u>o</u>ice:
  32.                                     </label>
  33.                                 </td>
  34.                                 <td>
  35.                                      
  36.                                 </td>
  37.                                 <td>
  38.                                      
  39.                                 </td>
  40.                             </tr>
  41.                             <tr>
  42.                                 <td width="100%" >
  43.                                     <input id="Choice" name="Choice" style="width: 100%" size="55" accesskey="o" type="text"> 
  44.                                     
  45.                                 </td>
  46.                                 <td>
  47.                                      
  48.                                 </td>
  49.                                 <td>
  50.                                      
  51.                                 </td>
  52.                             </tr>    
  53.                             <tr>
  54.                                 <td nowrap>
  55.                                     <label for="Value">
  56.                                         
  57.                                         <u>V</u>alue (when selected, go to URL):
  58.                                     </label>
  59.                                 </td>
  60.                                 <td>
  61.                                      
  62.                                 </td>
  63.                                 <td>
  64.                                      
  65.                                 </td>                                
  66.                             </tr>
  67.                             <tr>
  68.                                 <td width="100%" >
  69.                                     <input id="Value" name="Value" accesskey="v" style="width: 100%" size="55" type="text" dir="ltr"> 
  70.                                     
  71.                                 </td>
  72.                                 <td>
  73.                                      
  74.                                 </td>
  75.                                 <td>                                    
  76.                                     <button name="BrowseURL1" value="Browse..." accesskey="b" onclick="PickURL(Value);" ID="Button1">
  77.                                     
  78.                                       
  79.                                     <u>B</u>rowse...
  80.                                   </button>
  81.                                 </td>
  82.                             </tr>                            
  83.                         </table>
  84.                     </td>
  85.                 </tr>
  86.                 <tr>
  87.                     <td height="100%">
  88.                          
  89.                     </td>
  90.                 </tr>
  91.                 <tr>
  92.                     <td colspan="2">
  93.                         <hr>
  94.                     </td>
  95.                 </tr>
  96.                 <tr>
  97.                     <td width="100%" colspan="2">
  98.                         <table width="100%">
  99.                             <tr>
  100.                                 <td width="100%">
  101.                                      
  102.                                 </td>
  103.                                 <td>
  104.                                     <table>
  105.                                         <tr>
  106.                                             <td>
  107.                                                 <button id="btnOk" tabindex="2" type="submit">
  108.                                                 
  109.                                                     OK
  110.                                                 </button>
  111.                                             </td>
  112.                                             <td>
  113.                                                  
  114.                                             </td>
  115.                                             <td>
  116.                                                 <button id="btnCancel" onclick="onCancel()" tabindex="3" type="button">
  117.                                                                                             
  118.                                                     Cancel
  119.                                                 </button>
  120.                                             </td>
  121.                                         </tr>
  122.                                     </table>
  123.                                 </td>
  124.                             </tr>
  125.                         </table>
  126.                     </td>
  127.                 </tr>
  128.             </table>
  129.         </form>
  130.     </body>
  131.     <script type="text/JavaScript">        
  132.                 
  133.             function onOk()
  134.             {
  135.                 var sOptionName        =  theForm.Choice.value;
  136.                 var sOptionValue    = theForm.Value.value;
  137.                 sOptionName = trimStringLeft( trimStringRight( sOptionName ) );
  138.                 sOptionValue = trimStringLeft( trimStringRight( sOptionValue ) );            
  139.                 if ( 0 < sOptionName.length ) 
  140.                 {                                                                
  141.                     var astrReturn = new Array();
  142.                                         
  143.                     astrReturn[0] = String( sOptionName );
  144.                     astrReturn[1] = String( sOptionValue );
  145.                 
  146.                     window.returnValue = astrReturn;
  147.                     window.close();
  148.                 }
  149.                 else
  150.                 {
  151.                     alert( L_strMissingData_ErrorMessage );
  152.                     safeFocus(theForm.Choice);
  153.                 }
  154.             }
  155.  
  156.             function onCancel()
  157.             {
  158.                 var astrReturn = new Array();
  159.                                 
  160.                 astrReturn[0] = String( "" );
  161.                 astrReturn[1] = String( "" );
  162.  
  163.                 window.returnValue = astrReturn;
  164.                 window.close();
  165.             }
  166.             
  167.             function initializeForm()
  168.             {
  169.                 var aoArguments        = window.dialogArguments;
  170.                 if(aoArguments)
  171.                 {            
  172.                     var strDialogType    = aoArguments[0];                            
  173.                     if( "insert" == strDialogType.toLowerCase() )
  174.                     {
  175.                         document.title = L_strInsert_DialogTitle;
  176.                     }
  177.                     if( "edit" == strDialogType.toLowerCase() )
  178.                     {
  179.                         document.title = L_strEdit_DialogTitle;
  180.                         sChoice = aoArguments[1];
  181.                         sValue = aoArguments[2];
  182.                         theForm.Choice.value = sChoice;
  183.                         theForm.Value.value = sValue;
  184.                         theForm.Choice.select();
  185.                     }
  186.                 }
  187.                 safeFocus(theForm.Choice);
  188.             }
  189.  
  190.             function PickURL(eURL)
  191.             {            
  192.                 var url = FrontPage.ShowPickURLDialog(FrontPage.ActiveDocument.url, eURL.value);
  193.                 if (url != '') 
  194.                     eURL.value = url;
  195.                 eURL.focus();
  196.             }
  197.  
  198.     </script>
  199. </html>
  200.